using System;
using System.ComponentModel.DataAnnotations;

namespace ERP.Domain.Warehouse.Allocation
{
	/// <summary>
	/// 调拨单头（库存调拨）
	/// </summary>
	public class TransferOrder
	{
		[Key]
		public int Id { get; set; } // 改为 int

		[Required]
		[StringLength(40)]
		public string TransferNo { get; set; }

		public byte BillStatus { get; set; } = 10;

		public DateTime ApplyDate { get; set; }

		[Required]
		[StringLength(32)]
		public string TransferType { get; set; }

		public int FromWarehouseId { get; set; }
		public int ToWarehouseId { get; set; }

		public byte OutStatus { get; set; } = 0;
		public byte InStatus { get; set; } = 0;

		public decimal TotalQty { get; set; }
		public decimal TotalAmount { get; set; }

		[StringLength(64)]
		public string HandlerName { get; set; }
		[StringLength(64)]
		public string ApplicantName { get; set; }
		[StringLength(512)]
		public string Remark { get; set; }
		[StringLength(64)]
		public string CreatedBy { get; set; }

		public DateTime CreatedAt { get; set; } = DateTime.Now;
		public DateTime UpdatedAt { get; set; } = DateTime.Now;
	}
}

